trace func fixed