Adding template patterm