in reply to Re^5: probably stupid mistake
in thread probably stupid mistake

it is working for you but not for me and I really do not understand why.
Do exactly what I did: download your code and 2 input files from your nodes into new files, then run them. If that still doesn't work, then please heed the advice I pointed to in Basic debugging checklist, namely, add lots and lots of print statements to your code. The speed with which you respond to my posts leads me to believe that you have not tried any of these debugging techniques yet.