leafsBlocks calculating