removed some code for diagnostics.