Switch snippet.