add pattern and data constructors