fixing script after "pulse" addition