Edited moveForward and moveBackward