templates merge