addInstance and getInstances