refactoring the regex
refactoring automation scripts