basic raw text extraction code completed