intermediate commit: small refactoring