use mongo; caching; refactoring