Rework on the doc for  switch example