added switch options and deleted depreciated function