Added support for profiling