fixed bug of backspace key and add kill function and make it neat