add serialization for Instance