Made compatible with ES6 syntax