First cut of profiling function