Changed to sum of squares of histogram. Not good enough.