-robot switch code