added support for collection serialization (any implementing ICollection)