Added switch instead if