extracted IntersectionCalculator, refactored, replaced ArrayList with LinkedList