added categories and patterns