Implementing the switch case