using HashMap to avoid adding more subsegments of the same line
... but losing timing