Added CommonJS implementation