add backtrack function
add more trace