small refactor & coverage