Add the call to applyPattern