make trajectory-based conversion faster

remove dupulicate computations