use this.when instead of this.promiseProvider.when