added traj measure
fixed first 3 cases and overall architecture
updated rest of the cases