change the way states are removed edit box