Implement move function, create tests