bug in couting iterations...
restructure test cases in main()
some preliminary results. need to improve search efficiency.