refractored move method