add category logic