Added suppport of diag()