made it run in node and added node test