if-elif-else to switch