made changes to move function to include check for a jump