refactor the github client