fixed deduplication
added data type
added tests