adding some print statements to try and figure out the issue