Adding prefill functionality to template class.