Gabe's noStim code with many changes