change $max to 100