Changed ByteArrayReaderWriter to work