added diagnostics