added callbacks for logEvent