added transpose function
added some functions