merge with mat