more changes for block randomization