do_category function finished