modify trajectories second endpoint