show how to use function in template