gh-13 small refactoring