Updated db adapter to use mongodb