computing xy slices of rotation matrices was wrong. now computing everything in 3d and then taking the xy slice at the end