final version of Testcollatz.py