Diags function added