Replaced else with second if