optimizing requires to not have cyclic dependencies