ES6 way of mode.