I got the pattern, now how do I automate it