passed all small graph test.