add option to keep uniques instead of keep replicates