refactor remove mongodb group function from dialogue manager