Replace reportin if else with switch case