first pass over code for profiling