#49 minor refactoring