attempt to make library work in node.js