made medoids return a set