ah, okay, that is super helpful! thank you so much- I think I've figured most of it out.
what if I only wanted to randomize presentation of stimulus pairs by pair (e.g. a1 b1, a2 b2, a3 b3 etc are paired, but either pair could be presented at a random time)? the code above flips the location, but doesn't keep the pairings consistent.
i really appreciate your help!