upgrade detective for es6