Added some mongodb code