promise/deferred mode according to pu ling