resolve circular dependencies