flatten arguments of AVERAGE