implement switch support
Merge pull request #12 from jrsearles/switch-support

implement switch support