add some test cases
fix some bugs which finded in testcases develop