title: How to convert Waterfall method to promise
body: <p>Below is a code snippet using async-waterfall method. How can i convert this using promise.</p>
  
  <pre><code>async.waterfall([
      function(callback){
       User.update({username: user.username}, {$set: update_list}, function(err, a_user) {
        if (err) {
          err = new Error();
          err.code = 400;
          err.message = "Unexpected error occurred."
          callback(err)
        }
        if (!a_user) {
          err = new Error();
          err.code = 400;
          err.message = "User not found."
          callback(err)
        }else{
          callback(null, "updated", user_image);
        }
      })
     }, function(message, user_image, callback){
      if(user_image == undefined){
        callback(null, "done")
      }else{
        Bean.update({username: user.username, status:"Active"}, {$set: {user_image:user_image}},{multi:true},function(err, beanUpdated){
          if(err){
            err = new Error();
            err.code = 400;
            err.message = "Unexpected error occurred."
            callback(err)
          }else{
            callback(null, "done"); 
          }
        })
      }
    }
    ], function(err, result){
      if(err){
        return res.json({code:err.code, message:err.message})
      }else{
        return res.json({code:200, message:"Successfully updated profile."})
      }
    })
  </code></pre>
  
  <p>I usually use waterfall and series method of async module for synchronise my Node js code. Help me to switch from async to promise.</p>