I am thinking to change local variable to newMax and then assign to this.max ? just for readability