improving sample 2 for coverage-js