cleanup, with test code in test.py