init all *_sum to 0 and mit real numbers (didn't help much with sorting issue, but at least it's correct)