extracted quick find into common lib
extracted graph-building code