add template accept function to reader