extract dependencies to apropriate dirs