backtracing and data structure