logic to prevent recreation of depdencies