fail gracefully for lack of stim number; moving more perf functions in