changed byteCount to private field