working on conversion to templatized rw