un-refactored version of pies based off of polyline