Adding patterns into definition