switch explained