merge all templates together