move promise to lib
move promise to lib