using randomized code