changed spherical grid calculation