begun refactoring louvain program