add StepCounter and Undo