implement diagnostics