sph_dist replaced, tested, better.