add flexibility to test.py