Changing read to use a byte buffer