add area calculation function.