Adding text input functionality