Last version with list of trajectories, not dictionaries