stats: port class to es6