make node.js compatible