code: function wrap(ctx, fn, key) {
      return function() {
          var def = Q.defer(),
              args = _.toArray(arguments);
  
          args.push(def.makeNodeResolver());
          fn.apply(ctx, args);
  
          return def.promise;
      }
  }
docs: ** simple wrapper function for introducing a promise interface