debug code for print_response