Just did a bunch of crazy stuff to hack around to get this to run from the command line

so we can call it from python