renamed Dist.distance to sqDistance