undo stackempty error fix, refactored do and undo() method to take array of alignment...