Variable to template passing