Tracing functions adjusted