changes to use mongodb