implementations of some data structres in javascript for use with nodejs