add some code to generate text input