changed move function

check this out @catburston