profiling loop