**OS** (e.g. Win10): macOS Big Sur Version 11.6

**PsychoPy version** (e.g. 1.84.x): 2021.1.2

We are creating a math stress task where participants:

- are given a math problem as an image
- select a response within a given timeframe
- are provided feedback (correct, incorrect, respond more quickly)
- are shown a fake bar graph that shows how they are doing in comparison to other participants (“Comparison” routine in the image below)

**Steps 1-4 are repeated 5 times per block** . Each time, the pre-made image bar graph indicates that the participant’s performance is slightly worse than other participants.

At the end of the block, they are asked how stressful the set of problems are.

I am having a difficult time properly demonstrating the bar graph images, in sequence, only one after each feedback.

I think this may be due to my “comparison_loop_block” placement or the need to add a code component.

For some context, my “comparison_loop_block” references my excel loopfile (entitled Comparison_loopfile.xlsx). Within this file I have the file locations for excel files under the column named “Comparisonfile” - referenced in “comparison_loop_1”. Each of the files contains a column “ComparisonImage” which contains the location for an image of a comparison graph that is referenced in the “comparison” block. It is important that the images stay in the order in which they are currently organized.

**Comparison_loopfile.xlsx**

**Settings of comparison_loop_block**

**Settings of comparison_loop_1**

**Example of excel file which leads to the location of the comparison graph image:**

**What I tested:**

When I try placing the “comparison_loop_block” within the bounds of the “trials” block that controls the image presentation of the math problems, the *same* math problem shows up 5 times. After each time the image shows, the comparison graph *does* change as it should - in order (suggesting that the participant is doing worse than others), one at a time (only one after each math problem). After showing the same math problem 5 times and all 5 different graphs appear, another math image is shown 5 times and all the graphs again appear one at a time, in order. Basically, I need to fix this scenario so I get a different math problem rather than the same problem showing up 5 times.

When I try placing the "comparison_loop_block outside of the bounds of the “trials” loop, the reverse occurs. The math problems change but the graph stays the same all 5 times. Then, the same 5 math problems appear randomly while the next graph image comes up, etc.

I am unsure what steps I should be taking to ensure both the math problems and comparison graphs are changing each time. I only want each block to contain 5 math problems and the comparison graphs to be shown sequentially (only one after each math problem)

Thank you so much for your time!