small refactorings in for coverage fix