Added autocordiag functions