use getBytes() instead of looping over getByte()