improved threading switch