adding the function to do the backward trajectory
Merge remote-tracking branch 'origin/master'