modified trajectory_player for reuse