implemented createPattern and checkContent
changed comment