Added a new pattern and made it easier to add new patterns