fix for rotated datasets and new alg