another small refactoring