n-dimensional transformations and invariant measures