broke up main into functions, added test cases to confirm graph copying is correct, added get best graph function to main