changes to support profiling