Create recursive-func