added method to model for categories