Added switch and try