Problem 4 : Remove useless if else redundancy