efficiently trace