pattern and sequence