added stats tracing