adding diagnostics