not storing the function... just building dominator set from the reference once and for all