[mongo] Rewrite mongodb to use