Added logic and changed command format to support a second switch