accept function in template