add average operation