implement GetBlockRange and tests