saved the boilerplate code for retiming a trajectory here, prior to actual execution