added text field logic