adding craploads of logging to code i didn't write, to find out why the code i did right, doesn't work #debuggingisfun