add option for switching between spherical and polar