initialize pattern