added some functionality for textField