added backspace functionality