added support for duplicates in src/dataset.js