added more profiling