added affine transformations