modify methods of InstanceImpl class.