added transpose option