refactored the main function, added an influence graph function (not implemented yet), and a graph test script