fixed repeated use of pattern