updated the pattern through the file