small refactor

(up to 62% line coverage!)