changed move function