Threshold gating and other functions