average and period calculated