fixed code example for tracing