#24 minor refactoring