remove unnecessary promise.then