refactor and rename

removed indirection for reading and writing were possible