added code profiling