Added simple profiling code