added undo functionality and perhaps did something else which I currenly can not recall.