tried to make extract_text make a little more sense