adding capability to replace original text with more or less lines than original text