added more diagnostics