correctly getting text from pages, printing it out to terminal