add function to reset input state