test for template equivalent function