split handleParagraph middleware