adding profiler functionality