Instead of using a random number now using max sessions