Added initial draft of modifyTrajectory