Coding sample using MongoDB