added support for commonjs