Adding functionality to Polygon