MongoDB Homework code (week2)