#28 minor refactoring