read one byte a time