added traj norm computation