max() isn't defined on int in some implementations