made Sphere a template class and use standard arrays.