modify generate randomBlocks