add switch that allows profiling
remove stray debug code