added touch control for changing the direction of movement