changed method of getting page text