try to adapting SQL to MongoDB codes