added diagonal functions *Experimental*