Since CL's got a way to store the last step, then all they need to do is make a dropout stack of that data structure. It's very easy. Just have a static array, and pretend it's a ring, then keep a pointer to the most recent step. As you undo/redo, you can move the pointer backwards and forwards. You also keep a pointer to the tail so you know when you've gotten to the bottom of possible undoing. This is something they teach every sophomore CS student. (like me last year.) :P