moved the mongo code into it's own service