creation of transformation matrix