new attempt at coverage calculation, now with script