add switch case for routing