Changed deferred object to call promise