add comments details to template_redirect function