added regex to check names (the function is in test.py)