merge MAM3 and MAM4