fixed so all traces are same length