added backspace code for undoing dynamic character frequency changes