Made profiling optional