added handler for empty paragraphs