added prints to trace