You never initialized the "max" variable. I'll try to explain it as easy as I can. To initialize means to set equal to a value, even if that value has the possibility of being changed 100 times over...