Maybe try with recursion ? This doesnt iterate