refactoring for github integration