implements gatheringLines
removed comment