added transpose functionality