delete line added; backspace added;need to implement trackHistory  function later