refactor to github payload class