line 677-681 should happen inside textViewDidEndEditing: method