Added instrumentation code