Factorize switch