replacing pattern in the mold