added capture as bytearray