Use sum instead of reduce