read and write policies now with template class (update) - commented code