changed switch by os