refactoring to extract mongodb config to a properties file