Use when instead of bluebird/es6-promise