Added inline transpose
Added transpose function