added switch/case and ternary ? for if else statements