modify InstanceImpl class.