CreateDependencies function