other small refactoring