added switch and increment