updating pattern