template in transpose