added undo functionality to remote class with tests