-implementation of set allowing duplicates