Change nested if by switch on MessageSubject