now it actually seems to work, see output.txt