Add some code for mongodb