modif index

add switch case