corrections, but infinite loop
capture newLines to avoid infinite loops