add getExistInstances method to InstanceImpl class.