update profiling code