first working version for 3 pos switch