add template functions utils in templateutils