It seems that max is used instead of sum 