reading by 1 byte is a bad practice