before apply a promise API
complete part5