refactoring init_blocks
almost working two dimensional array
it is working.