readbytes instead of read slice to avoid weird buffering issues