add textfield delegate code