minor refactoring

see commit