read and write policies now with template class