algorithm for github repo filestructure