added callbacks for switching identities