changed to ES6 syntax