added support for sub paragraphs