added delete and backspace functionality