added old category-remove code back in place