Adding transpose function.