added array serialization