handler switching works