added randomized functions