Code from Node/mongo class