small refactoring stuff