updated the routeRandom() and routeFirst() methods