started to add function tracing