working on read, added byte buffer