start regex refactoring