add mongo save logic