added structure for undo move