add maxBlocks and add comments