adding function to the profiler class