added comments to template.php