close #169 minor refactoring