Updating code to take backspace too