small changes to facilitate profiling