correctly remove switch