added initial profiling code