test getbytes, allow range of bytes.w