refactored custom input outside of the WebView