First attempt at sum of squared differences checking