optimized mongo db use