average calculation is done