made some profiling related modifications