update pattern match