change matching recursion and doing less requests