added randomizer functionality