added new constructor for bytearray