added a class to describe pattern