bytearray as generic object