ok, I have replaced the switch with the if.