added switch and config