changes to make it work with python3. now we see if we can make it work on python2.7
all tests pass in py3. py27 wip.