ref and out