area weighting function added