small set of profiling functions/code I'm sick of reproducing