Merge pull request #369 from negativeExponent/switch