did some debugging, will need to figure out stimulus.trialend