Implement mongodb save and retrieve