Added patchify method