add tracing function, it was used for debug