add local function tracking code back in