make on/off switch work with photon beam