Added a bit of profiling