better structure for node.js version