change to github api, add three functions