maybe we can utli method to the shardIter here? I'd prefer to keep this code short here it's large enough