migrated from ES6 to CJS