working on affine transformation