added support for randomization during reset