Outstanding:
duplicates in array are not yet discarded.