fixing jshint warnings about Promise