Implemented query-tracing