modify the test, make promise api work