make it work with commonjs