remove the mongodb connecting from the API code
mock out mongodb in the tests