Merge of Pull 657: Average and Sum