Relace if by switch part 1