added db module to normalize access to the mongodb