use es6 promises instead of q library