implemented XML serialization