add a function to have access to the pattern