Transpose functions added.
TO DO : clean it up