this should be done inside the switch case