modify heidolph for node.js use