Implementing move operation