added double ampersands  to switch case to get conditional