def works with byte packing