added parameter validation to test.py