modified move method