#41 minor refactoring