add reset button, update input form when history selected.