add some tests, python3 fixes