fixed many tests to run using python 3