small changes to template.php