recursive if.