updated .getText() function. Tested it and it seems to be working