modified for node.js backend