added getText function