added debug code for time profiling