add some trace code