cleanup & more instrumentation