migrate to CommonJS