use frequency||average instead of gather