New sphere code