Added the textfield functionality