updated rank_trace