modified  function, which generates text without paragraphs