fully tested preprocessing
put in production preprocess with flipped WG dim