Use ES6-Promise API properly