remove all but the first trajectory.