stuck on undo function. need help with parser part