allow template binding in functions