* fixed profiling function