fixed SumSquareDifference
consolidation