redefined constants, improved undo