the only solution that i have in mind in calling this function from inside a for loop
from another function
but unfortunately i am not allwed to use loops ,external function
its all has to be done in this function in a recursive way
??
(i can add parameters to the signature)