Add profiling to chapt 9