solve if condi recurcive prob