proper text extraction