Updating pattern library