refactor to now use ES6 modules