Added switch pattern