adding print statements to trace better