basic infrastructure for tracking ID refs