deal with functions
test for functions in templates