Adding tests and code for move