updated switcher to parse options