Made parseText functional