changed backspace to correctly remove character BEFORE the cursor instead of AT