added some print statements to try to see where code is failing - no useful results in output