noise preserving sum of squares comparission function