working in node (need tests)