resource-based k-medoid done