added tpl_classes() function