finish MoveCommand code