keeping track of the motion