Added direction 'y' to the move function