test by switch