another minor refactoring