important improvent, solved the problem on detecting disconnected switches.