tidy up trace