finished except for adding arguments to the ouput of trace