deleted diag(a,b) from procedure