first pass to init inhertance graph