Replacing the variable switch with sw.