more notes on switching logic