add select category function