public void NextTrial()
    {
        if (!runExperiment)
        {
            return;
        }
        try {
            t = _experiment.LoadNextTrial();
        } catch (AllTrialsPerformedException e) {
            Debug.Log("Experiment finished !");
//            return;
        }

        // _experiment.StartTrial();
        currentTrialIndex = _experiment.GetCurrentTrialIndex();

        Debug.Log("Next Trial");
        // parse what you have in thee header
        string pattern     = _experiment.GetParameterData("pattern");
        string temperature = _experiment.GetParameterData("temperature");

        Debug.Log("pattern = " + pattern);
        Debug.Log("temperature = " + temperature);

        if (temperature == "hot")
        {
            pm.temperatureIntensity = 255;
        }
        else if (temperature == "cold")
        {
            pm.temperatureIntensity = 32;
        }
        else
        {
            pm.temperatureIntensity = 0;
        }
        pm.TriggerPatterns(pattern, pm.motorIntensity, pm.temperatureIntensity, pm.duration, pm.startOffset);

        _experiment.AddTimer("ReactionTime");

        _experiment.StartTrial();

        TouchStimuliFinished();
    }