cleaned up polygonization