refactored the aq profiler