refactor Polygon