refactored do and undo() method to take array of alignments for operations that resul...