cleanup and modify randomizer