code for generating, checking, and messing with similarity stimuli