all test passed (except when graph too big : stackoverflowError