Added ability to turn attenuation on or off.