added mongoDB support. lots of other work. bad commit message...