calc_area function created