Add function to calculate area of polygons