added traj counter and continous walking, UNTESTED