change list to bytearray