It seems that max is used instead of sum 
It seems that max is used instead of sum