refactored reading in of paragraphs from text file