Refactored textFieldExample