regression on trajectories working