Implemented retrieveSwitch() correctly.