added the possibility to define a transformation matrix