added some basic profiling