support local variables to template