improved github upload function
moved private method