Added method to replace public object.