Implement  using deferred promise