update pattern on input change events