add utility functions for polygons