un-nest the else clause and place it after the if