moved from class to module, fixed issue in recursive method

it failed on the second run because the dependency would be delivered as string
now we always do a API call for every dep