solve the module dependency tree