allow templates with functions