write gaia set's test case and fix some bugs.