adding non es6 version, updating comments