support template function expand