dynamically populated categories and fixed randomizer

fixed the array and randomizer issue