added diag func
Merge pull request #11 from ckammerl/diags

added diag func