Many changes. I may redefine the table Traj in order to add cond_idx as a primary key field