comment utiliser la fonction switch