implement various data structs / algorithms in node