Add category function.