You should just use `max` instead of `newMax`.