compare trajectories