added switches in routes