fixed variable passing in template.class->display method