updated template.php