minor refactpring to patternStorage