add commonjs and programmatically usage support