modify Instance interface and InstanceImpl class.