stimuli generation function update
Modifications to allow for automatic generation.