profiling code added