implement build and addedge
add makeWorklist
fixes