case statement for the routes