resolve cyclic dependencies