Added code to calculate to coverage if not provided.