update to template.php