resetinput function make more simple