Change multiple if/else if into switch