insert and update category, update is pending