refactor mongo structure