removed diagnostics code