fixing switch case