I have shifted pattern logic to a new file, with a new argument -p / --pattern