refactor Profiler class