implemented upto valid-blocks.