added pattern and changed body