fix a callback hell
add more test