began Ellipsoid code