added pattern warping