basic implementation of new reader/writer