resolving circular dependencies