adjusted to be able to run tests in Python 3