added part of the movement logic