added check block logic