implement traverseDependencies