placed SegmentPairExtractor outside ProblemAssembler and fixed seg fault in SegmentPairExtractor