added contour area function