starting to add in option for whether to use spherical coordinates or not. Not done yet