working on traj opt