Working on the trace functionality