modified add_category