switch disable function added