small refactoring for one less Reek warning