renaming template function to avoid name conflict with directive template