re-organized coverage calculation code blocking