pattern regenerate