Update to use block function in template