fix 1d to 2d
inverse bug remains...