change case to if else