add delegate to the textfield