flipped direction of transform in calculation of statistics. Now the transform goes from reference frame to current frame