trying to fix problem with counting the byte position of the reader