finish simple test, fix some bug