add area calculation function