add writebytes to packet