use MAX_BLOCKS for array size instead of 6