Moved rand into the utility class