updated so it works in node

This had been worked on for some time… good time to update what is here
on github…