switch dectiled on the fly