works with either affine