If the syllable before MASU is RI, you change RI and MASU together, RIMASU, to TTE. So, ATSUMARIMASU (to gather) becomes ATSUMATTE. This rule also applies, when the syllable before MASU is I or CHI.