work on PY3 compatibility, working through python 3 test failures, some way to go yet