cleaning up the input method