update with pattern