Change from dupping method to undo method for checking safe moves