reorganized fitting of sphere model