add two commands, enhanced TestTraj function