Converted if to if / else