Sphere of spheres and a tough bug in my code