added basic profiling functionality