added backtracing routines